﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace LMCmdLetLib
{
    [RunInstaller(true)]
    public class LMCmdletLibSnapIn : CustomPSSnapIn
    {
        private Collection<CmdletConfigurationEntry> m_cmdlets = new Collection<CmdletConfigurationEntry>();
        private Collection<ProviderConfigurationEntry> m_providers = new Collection<ProviderConfigurationEntry>();
        private Collection<TypeConfigurationEntry> m_types = new Collection<TypeConfigurationEntry>();
        private Collection<FormatConfigurationEntry> m_formats = new Collection<FormatConfigurationEntry>();

        //constructor
        public LMCmdletLibSnapIn()
            : base()
        {
            m_cmdlets.Add(new CmdletConfigurationEntry("Get-LabManagerInternal", typeof(GetLabManagerInternal), null));
            //Todo
            m_cmdlets.Add(new CmdletConfigurationEntry("Get-LabManager", typeof(GetLabManager), null));
        }


        /// <summary>
        /// Gets description of powershell snap-in.
        /// </summary>
        public override string Description
        {
            get { return "This snap-in contains cmdlets to manage VMware vCenter Lab Manager"; }
        }

        /// <summary>
        /// Gets name of power shell snap-in
        /// </summary>
        public override string Name
        {
            get { return "vCenterLabManagerSnapin"; }
        }

        /// <summary>
        /// Gets name of the vendor
        /// </summary>
        public override string Vendor
        {
            get { return "Michael Fudge"; }
        }

        public override Collection<CmdletConfigurationEntry> Cmdlets
        {
            get { return m_cmdlets; }
        }


        public override Collection<ProviderConfigurationEntry> Providers
        {
            get { return m_providers; }
        }


        public override Collection<TypeConfigurationEntry> Types
        {
            get { return m_types; }
        }


        public override Collection<FormatConfigurationEntry> Formats
        {
            get { return m_formats; }
        }

    }
}
